package com.doubao.hardware.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.Map;

/**
 * 设备配置模型，对应txt.txt中的JSON结构
 */
@Data
public class DeviceConfig {

    @JsonProperty("desired")
    private DesiredConfig desired;

    @JsonProperty("reported")
    private ReportedConfig reported;

    @JsonProperty("tags")
    private Map<String, String> tags;

    @Data
    public static class DesiredConfig {
        @JsonProperty("tts_config")
        private TtsConfig ttsConfig;
    }

    @Data
    public static class TtsConfig {
        @JsonProperty("voice_type")
        private String voiceType;
    }

    @Data
    public static class ReportedConfig {
        @JsonProperty("hardware_device_wuid")
        private String hardwareDeviceWuid;

        @JsonProperty("api_models")
        private ApiModels apiModels;
    }

    @Data
    public static class ApiModels {
        @JsonProperty("bot")
        private ApiModel bot;

        @JsonProperty("standard")
        private ApiModel standard;
    }

    @Data
    public static class ApiModel {
        @JsonProperty("path")
        private String path;

        @JsonProperty("api_key")
        private String apiKey;

        @JsonProperty("endpoint")
        private String endpoint;

        @JsonProperty("model")
        private String model;
    }
}